package org.n.shop.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.n.shop.domain.Do.SelectCommodityDetailDo;
import org.n.shop.domain.entity.Commodity;

import java.util.List;

@Mapper
public interface CommodityMapper {
    List<Commodity> all(@Param("page")int page,
                        @Param("pageSize")int pageSize,
                        @Param("key")String key,
                        @Param("orderBy")int orderBy,
                        @Param("type") int type);
    int total(@Param("key") String key, @Param("type") int type);
    SelectCommodityDetailDo selectById(@Param("id") int id);

    int reduceStocks();
}
